/**
 * 
 */
package com.auxgroup.hr.front.commons.vo;

import org.apache.commons.lang.builder.ToStringBuilder;

import com.auxgroup.hr.front.commons.BaseRetCode;


public class BaseResponseVO {
	private String retCode = BaseRetCode.CODE_ERROR_SYS.getRetCode();
	private String retMsg = BaseRetCode.CODE_ERROR_SYS.getRetMsg();
	private Object retData = EmptyRetData.instance;

	public BaseResponseVO() {
		
	}
	/**
	 * @param retData
	 */
	public BaseResponseVO(BaseRetCode retCode, Object retData) {
		this(retCode.getRetCode(), retCode.getRetMsg(), retData);
	}

	/**
	 * @param retCode
	 * @param retMsg
	 * @param retData
	 */
	public BaseResponseVO(String retCode, String retMsg, Object retData) {
		this(retCode, retMsg);
		this.setRetData(retData);
	}

	public BaseResponseVO(BaseRetCode retCode) {
		this(retCode.getRetCode(), retCode.getRetMsg());
	}

	/**
	 * @param retCode
	 * @param retMsg
	 */
	public BaseResponseVO(String retCode, String retMsg) {
		this.setRetCode(retCode);
		this.setRetMsg(retMsg);
	}

	public String getRetCode() {
		return retCode;
	}

	public void setRetCode(String retCode) {
		if (retCode != null) {
			this.retCode = retCode;
		}
	}

	public String getRetMsg() {
		return retMsg;
	}

	public void setRetMsg(String retMsg) {
		if (retMsg != null) {
			this.retMsg = retMsg;
		}
	}

	public Object getRetData() {
		return retData;
	}

	public void setRetData(Object retData) {
		if (retData != null) {
			this.retData = retData;
		}
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}

}
